package logic.common.missions;

import org.fenggui.util.Color;

import com.jme.math.Vector3f;

import logic.common.player.Player;
import logic.common.team.Team;

public abstract class Mission {
	
	protected Team team;
	protected int money, assistMoney;
	protected boolean isActive;
	
	public Mission(Team team, int money, int assistMoney) {
		this.team = team;
		this.money = money;
		this.assistMoney = assistMoney;
	}
	
	protected void missionAccomplished(Player player) {
		team.missionAccomplished(this, player);
	}
		
	public int getRewardMoney() { return money; }
	
	public int getAssistMoney() { return assistMoney; }
	
	public String getDescription() {
		return getText() + " (" + getRewardMoney() + ")";
	}
	
	protected abstract String getText();
	
	public abstract String[] getInfoTexts();
	
	public abstract Color[] getInfoColors();
	
	public abstract String[] getAssistTexts();
	
	public abstract Color[] getAssistColors();
	
	public abstract Vector3f getMissionLocation();
	
	public abstract boolean deleteAfterComplete();
	
	@SuppressWarnings("unused")
	public void missionActivated(boolean active, Player player) { isActive = active; }
	
	public boolean isActive() { return isActive; }
}